public class Test {

    public static void main1(String[] args) {

        int i = 10;
        Integer ii = Integer.valueOf(i);
        Integer ij = new Integer(i);

        int j = ii.intValue();
        System.out.println(ii);
        System.out.println(ij);
        System.out.println(j);
    }

    public static void main2(String[] args) {
        int i = 100;
        Integer p = Integer.valueOf(i);
        Integer t = new Integer(i);

        Integer t1 = i;
        System.out.println(t1);
        int k = p.intValue();
        int k1 = p;
        System.out.println(k1);

        System.out.println(p);
        System.out.println(t);
        System.out.println(k);

    }

    public static void main3(String[] args) {

        Integer a = 127;
        Integer b = 127;

        Integer c = 128;
        Integer d = 128;

        System.out.println(a == b);
        System.out.println(c == d);
    }

    public static void main12(String[] args) {

        Work<String> c = new Work();
//        c.setP(0, 3);
//        c.setP(1, 3.2);
        c.setP(2, "123fe");
//        int a = (int)c.getP(0);
//        double b = (double) c.getP(1);
        String v = (String) c.getP(2);

//        System.out.println(a);
//        System.out.println(b);
        System.out.println(v);
    }

    public static void main(String[] args) {

        List<Integer> l = new List<>();
        l.setP(0, 32);
        l.setP(1, 12);
        l.setP(2, 43);
        int p = l.getP(2);

    }
}

class Work<T>{

    public Object[] p = new Object[10];

    public void setP(int t, T a) {
        p[t] = a;
    }

    public T getP(int t) {
        return (T)p[t];
    }
}

class List<T extends Number>{

    public Object[] p = new Object[10];

    public void setP(int t, T c) {
        this.p[t] = c;
    }

    public T getP(int t) {
        return (T) p[t];
    }
}
